package com.lb.adapter;

import java.util.ArrayList;

import com.lb.bean.SongBean;
import com.lb.kugou.R;

import android.app.Service;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class SongListAdapter extends BaseAdapter {
	private int view = R.layout.song_list_item;
	private ArrayList<SongBean> songBeans;
	private Context context;
	public SongListAdapter(int view, ArrayList<SongBean> songBeans, Context context) {
		this.view = view;
		songBeans = songBeans;
		this.context = context;
	}
	
	public SongListAdapter(ArrayList<SongBean> songBeans, Context context) {
		songBeans = songBeans;
		this.context = context;
	}
	@Override
	public int getCount() {
		return songBeans.size();
	}
	@Override
	public SongBean getItem(int position) {
		return songBeans.get(position);
	}

	@Override
	public long getItemId(int position) {
		return songBeans.get(position).getId();
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		SongListTag songListTag = null;
		if(convertView == null){
			LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE);
			convertView = layoutInflater.inflate(view, parent);
			
			convertView.setTag(songListTag);
		}
		songListTag = (SongListTag) convertView.getTag();
		SongBean songBean = songBeans.get(position);
		
		
		
		
		return convertView;
	}
	public class SongListTag{
	}

}
